<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Flink</title>
    <link rel="shortcut icon" href="/static/images/favicon.ico">
    <link rel="stylesheet" href="/static/lib/layui/css/layui.css" media="all">
    <script src="/static/lib/layui/layui.js" charset="utf-8"></script>
    <script src="/static/lib/jquery.min.js"></script>
    <script type="text/javascript" src="/static/lib/xadmin/xadmin.js"></script>
    <style>
        .layui-fluid{position:relative;margin:0 auto;padding:15px 15px}
        .site-title{margin:5px 0 10px}
        .site-title fieldset{border:0;padding:0;border-top:1px solid #eee}
        fieldset{display:block;margin-inline-start:2px;margin-inline-end:2px;padding-block-start:.35em;padding-inline-start:.75em;padding-inline-end:.75em;padding-block-end:.625em;min-inline-size:min-content;border-width:2px;border-style:groove;border-color:threedface;border-image:initial}
        .site-title fieldset legend{margin-left:10px;padding:0 10px;font-size:22px;font-weight:300}
    </style>
</head>
<body>

<div class="layui-fluid">

    <form class="layui-form" action="">
        <input type="hidden" id="id" value="0">
        <input type="hidden" id="gateway_num" value="">
        <div class="site-title">
            <fieldset><legend><a>网关</a></legend></fieldset>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">路由ID</label>
            <div class="layui-input-block" style="width: 475px;">
                <input type="text" id="route_id" placeholder="示例： flink-test" autocomplete="off" class="layui-input">
            </div>
            <div style="float: right;height: 0;top: -38px;right: 0;position: relative;">
                <button type="button" class="layui-btn layui-btn-normal" onclick="supplementRouteInfo()">自动补充路由其它信息</button>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">路由地址</label>
            <div class="layui-input-block">
                <input type="text" id="route_uri" placeholder="示例： http://flink-test:8081" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">匹配路径</label>
            <div class="layui-input-block">
                <input type="text" id="route_predicates" placeholder="示例：/flink-test/**" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">过滤层级</label>
            <div class="layui-input-block">
                <select id="route_filters_stripprefix">
                    <option value=""></option>
                    <option value="0">0</option>
                    <option value="1">1</option>
                    <option value="2">2</option>
                    <option value="3">3</option>
                    <option value="4">4</option>
                </select>
            </div>
        </div>

        <div class="site-title">
            <fieldset><legend><a>项目</a></legend></fieldset>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">需求简介</label>
            <div class="layui-input-block">
                <input type="text" id="project_summary" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">访问地址</label>
            <div class="layui-input-block">
                <input type="text" id="project_detail" autocomplete="off" class="layui-input">
            </div>
        </div>


        <div class="site-title">
            <fieldset><legend><a>配置</a></legend></fieldset>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">Flink版本</label>
            <div class="layui-input-block">
                <select id="flink_version">
                    <option value=""></option>
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">启动路径</label>
            <div class="layui-input-block">
                <input type="text" id="start_class" placeholder="启动main方法类全路径" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">启动内存</label>
            <div class="layui-input-block">
                <input type="text" id="task_manager_memory" placeholder="TaskManager启动内存   示例：2048m" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">JAR名称</label>
            <div class="layui-input-block">
                <input type="text" id="start_jar_name" placeholder="项目打包后的jar包名      示例：flink-test-1.0.jar" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">镜像地址</label>
            <div class="layui-input-block">
                <input type="text" id="image_name" placeholder="阿里云docker镜像地址" autocomplete="off" class="layui-input">
            </div>
        </div>
    </form>
    <div class="layui-form-item" style="margin-bottom: 0;">
        <div class="layui-input-block" style="float: right;">
            <button class="layui-btn" onclick="save_config()">立即提交</button>
        </div>
    </div>
</div>

</body>
<script src="/static/lib/cookie.js"></script>
<script src="/static/js/flink-project-edit.js"></script>
</html>